package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendanceDedAddDTO;
import org.jsola.hr.dto.AttendanceDedUpdateDTO;
import org.jsola.hr.dto.AttendanceMonthlyAddDTO;
import org.jsola.hr.query.AttendanceDedQuery;
import org.jsola.hr.vo.AttendanceDedListVO;
import org.jsola.hr.vo.AttendanceDedVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤扣款设置")
public interface IAttendanceDedControllerAPI {

    /**
     * 新增考勤扣款设置
     * @param attendanceDedAddDTO 考勤扣款设置新增实体
     * @return 考勤扣款设置展示对象
     */
    @ApiOperation(value = "新增考勤扣款设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedAddDTO", dataType = "AttendanceDedAddDTO", value = "新增考勤扣款设置", paramType = "body")
    })
    Result<AttendanceDedVO> save(AttendanceDedAddDTO attendanceDedAddDTO);


    /**
     * 修改考勤扣款设置
     * @param attendanceDedUpdateDTO 考勤扣款设置
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤扣款设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedUpdateDTO", dataType = "AttendanceDedUpdateDTO", value = "修改考勤扣款设置", paramType = "body")
    })
    Result<Integer> update(AttendanceDedUpdateDTO attendanceDedUpdateDTO);




    /**
     * 删除单个考勤扣款设置，彻底删除
     * @param attendanceDedId 考勤扣款设置id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤扣款设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedId", dataType = "String", value = "考勤扣款设置id", paramType = "path")
    })
    Result<Integer> delete(String attendanceDedId);


    /**
     * 批量删除考勤扣款设置，彻底删除
     * @param attendanceDedIds 考勤扣款设置id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤扣款设置，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedIds", dataType = "String[]", value = "考勤扣款设置id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendanceDedIds);


    /**
     * 根据考勤扣款设置id查询考勤扣款设置详情
     * @param attendanceDedId 考勤扣款设置id
     * @return 考勤扣款设置详情
     */
    @ApiOperation(value="根据考勤扣款设置id查询考勤扣款设置详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedId", dataType = "String", value = "考勤扣款设置id", paramType = "path")
    })
    Result<AttendanceDedVO> findById(String attendanceDedId);


    /**
     * 查询考勤扣款设置
     * @param attendanceDedQuery 考勤扣款设置查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤扣款设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedQuery", dataType = "AttendanceDedQuery", value = "考勤扣款设置查询参数", paramType = "query")
    })
    Result<List<AttendanceDedListVO>> listAll(AttendanceDedQuery attendanceDedQuery);


     /**
     * 分页查询考勤扣款设置
     * @param attendanceDedQuery 考勤扣款设置查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤扣款设置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceDedQuery", dataType = "AttendanceDedQuery", value = "考勤扣款设置查询参数", paramType = "query")
    })
    Result<Page<AttendanceDedListVO>> page(AttendanceDedQuery attendanceDedQuery);

    /**
     * 考勤扣款统计
     * @param attendanceMonthlyAddDTO 员工考勤月统计参数
     * @return page
     */
    @ApiOperation(value="考勤扣款统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceMonthlyAddDTO", dataType = "AttendanceMonthlyAddDTO", value = "考勤扣款统计", paramType = "body")
    })
    Result<Boolean> attendanceDedCount(@Valid @RequestBody AttendanceMonthlyAddDTO attendanceMonthlyAddDTO);



}

